package com.budwk.app.sys.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;

import java.io.Serializable;
import java.util.List;

/**
 * 系统应用表
 *
 * @author wizzer@qq.com
 */
@Data
@Table("dfxy_enterprise.sys_safety_patrol_group")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@ApiModel(description = "隐患检查项")
public class SysSafetyPatrolGroup  implements Serializable {
    private static final long serialVersionUID = -2586683849092276153L;
    @Name
    @Column
    @Comment("id")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String id;

    @Column("name")
    @Comment("检查组名称")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String name;

    @Column("item_id")
    @Comment("检查项id")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String itemId;

    @ManyMany(from = "itemId", relation = "dfxy_enterprise.sys_safety_patrol_item", to = "id")
    @ApiModelProperty(description = "检查项")
    private List<SysSafetyPatrolItem> items;

}
